<div class="cc-grid">
	<table class="cc-grid-header cc-grid-table">
		<thead><tr cc-bind-html="$ctrl.headerTemplate"></tr></thead>
	</table>

	<div class="cc-grid-body">
		<div class="datalist" cc-nice-scroll>
			<table class="cc-grid-table">
				<tbody cc-bind-html="$ctrl.bodyTemplate"></tbody>
			</table>
		</div>
		<div class="no-data-message"
				ng-if="!$ctrl.opts.loading && $ctrl.opts.data && $ctrl.opts.data.length === 0"
				cc-bind-html="$ctrl.emptyTipsTemplate"></div>
		<div class="error-message"
				ng-if="$ctrl.opts.errorMessage.length"
				cc-bind-html="$ctrl.errorMessageTpl"></div>
		<div class="loading-mask" ng-show="$ctrl.opts.loading">
			<cc-loading></cc-loading>
		</div>
	</div>

	<div class="cc-grid-footer" ng-if="$ctrl.opts.showPagination">
		<span class="selected-items-count" ng-show="$ctrl.selectedItems.length">已选<span ng-bind="$ctrl.selectedItems.length"></span>条</span>
		<span class="total-items-count">共<span ng-bind="$ctrl.opts.pager.totals"></span>条</span>
		<span class="reload" ng-click="$ctrl.onPagerChange($ctrl.opts.pager.pageNum, $ctrl.opts.pager.pageSize)">
			<span class="icon-refresh"></span>刷新
		</span>
		<span class="delimiter"></span>
		<cc-pagination
				page-num="$ctrl.opts.pager.pageNum"
				page-size="$ctrl.opts.pager.pageSize"
				page-size-list="$ctrl.opts.pager.pageSizeList"
				total-pages="$ctrl.opts.pager.totalPages"
				page-size-list-disabled="$ctrl.opts.pager.pageSizeListDisabled"
				on-change="$ctrl.onPagerChange(pageNum, pageSize)">
		</cc-pagination>
	</div>
</div>
